Skip to main content

RadioGroup

A common component to display radio button selectors for a list of selectable items

NameTypeDefault ValueRequiredDescription
optionsradioOption<T>[]YesZero based array of options. An option is an object with both a value which is the relevant data, and a label which is displayed as a string to represent the value.
valueTNoCurrently selected option. An initial value can be used or this can be left undefined which will have nothing initially selected.
onChange(val: T) => voidYesCall back function that passes the newly selected option's value as an argument to.
disabledbooleanfalseNooptional boolean that disables the radio group when set to true
errorstringNooptional error to display
isRadioListbooleanNooptional boolean to indicate to use the radio buttons in a list
radioListTitlestringNooptional text to show as the radio list title